import { get } from '@/utils/request';
import type { 
  MenuItem, 
  Permission, 
  DictItem, 
  AgentListResponse,
  UserInfo
} from '@/types/api';

/**
 * 获取菜单导航
 */
export const getMenuNav = () => {
  return get<MenuItem[]>('/sys/menu/nav');
};

/**
 * 获取菜单权限
 */
export const getMenuPermissions = () => {
  return get<Permission[]>('/sys/menu/permissions');
};

/**
 * 获取用户信息
 */
export const getUserInfo = () => {
  return get<UserInfo>('/sys/user/info');
};

/**
 * 获取字典数据
 */
export const getDictTypes = () => {
  return get<DictItem[]>('/sys/dict/type/all');
};

/**
 * 获取智能体列表
 */
export const getAgentList = () => {
  return get<AgentListResponse>('/intelligent/base/page');
};